var o = require("../../../uv-ui-tools/libs/function/throttle.js"), t = require("../../../uv-ui-tools/libs/mixin/mpMixin.js"), i = require("../../../uv-ui-tools/libs/mixin/mixin.js"), n = require("../../../uv-ui-tools/libs/mixin/button.js"), e = require("../../../uv-ui-tools/libs/mixin/openType.js"), r = require("./props.js"), s = require("../../../../common/vendor.js");

require("../../../uv-ui-tools/libs/function/index.js"), require("../../../uv-ui-tools/libs/function/test.js"), 
require("../../../uv-ui-tools/libs/function/digit.js"), require("../../../uv-ui-tools/libs/util/route.js"), 
require("../../../uv-ui-tools/libs/function/debounce.js");

var u = {
    name: "uv-button",
    mixins: [ t.mpMixin, i.mixin, n.button, e.openType, r.props ],
    emits: [ "click" ],
    data: function() {
        return {};
    },
    computed: {
        bemClass: function() {
            return this.color ? this.bem("button", [ "shape", "size" ], [ "disabled", "plain", "hairline" ]) : this.bem("button", [ "type", "shape", "size" ], [ "disabled", "plain", "hairline" ]);
        },
        loadingColor: function() {
            return this.plain ? this.color ? this.color : "#3c9cff" : "info" === this.type ? "#c9c9c9" : "rgb(200, 200, 200)";
        },
        iconColorCom: function() {
            return this.iconColor ? this.iconColor : this.plain ? this.color ? this.color : this.type : "info" === this.type ? "#000000" : "#ffffff";
        },
        baseColor: function() {
            var o = {};
            return this.color && (o.color = this.plain ? this.color : "white", this.plain || (o["background-color"] = this.color), 
            -1 !== this.color.indexOf("gradient") ? (o.borderTopWidth = 0, o.borderRightWidth = 0, 
            o.borderBottomWidth = 0, o.borderLeftWidth = 0, this.plain || (o.backgroundImage = this.color)) : (o.borderColor = this.color, 
            o.borderWidth = "1px", o.borderStyle = "solid")), o;
        },
        nvueTextStyle: function() {
            var o = {};
            return "info" === this.type && (o.color = "#323233"), this.color && (o.color = this.plain ? this.color : "white"), 
            o.fontSize = this.textSize + "px", o;
        },
        textSize: function() {
            var o = 14, t = this.size;
            return "large" === t && (o = 16), "normal" === t && (o = 14), "small" === t && (o = 12), 
            "mini" === t && (o = 10), o;
        },
        getIconSize: function() {
            var o = this.iconSize ? this.iconSize : 1.35 * this.textSize;
            return this.$uv.addUnit(o);
        },
        btnWrapperStyle: function() {
            var o = {}, t = this.$uv.addStyle(this.customStyle);
            return t.width && (o.width = t.width), o;
        }
    },
    methods: {
        clickHandler: function() {
            var t = this;
            this.disabled || this.loading || o.throttle(function() {
                t.$emit("click");
            }, this.throttleTime);
        }
    }
};

Array || (s.resolveComponent("uv-loading-icon") + s.resolveComponent("uv-icon"))(), 
Math || (function() {
    return "../../../uv-loading-icon/components/uv-loading-icon/uv-loading-icon.js";
} + function() {
    return "../../../uv-icon/components/uv-icon/uv-icon.js";
})();

var l = s._export_sfc(u, [ [ "render", function(o, t, i, n, e, r) {
    return s.e({
        a: o.disabled || o.loading
    }, (o.disabled || o.loading, {}), {
        b: o.loading
    }, o.loading ? {
        c: s.p({
            mode: o.loadingMode,
            size: 1.15 * o.loadingSize,
            color: r.loadingColor
        }),
        d: s.t(o.loadingText || o.text),
        e: s.s({
            fontSize: r.textSize + "px"
        }),
        f: s.s(o.$uv.addStyle(o.customTextStyle))
    } : s.e({
        g: o.icon
    }, o.icon ? {
        h: s.p({
            name: o.icon,
            color: r.iconColorCom,
            size: r.getIconSize,
            customStyle: {
                marginRight: "2px"
            }
        })
    } : {}, {
        i: s.t(o.text),
        j: s.s({
            fontSize: r.textSize + "px"
        }),
        k: s.s(o.$uv.addStyle(o.customTextStyle))
    }), {
        l: Number(o.hoverStartTime),
        m: Number(o.hoverStayTime),
        n: o.formType,
        o: o.openType,
        p: o.appParameter,
        q: o.hoverStopPropagation,
        r: o.sendMessageTitle,
        s: o.sendMessagePath,
        t: o.lang,
        v: o.dataName,
        w: o.sessionFrom,
        x: o.sendMessageImg,
        y: o.showMessageCard,
        z: s.o(function() {
            return o.onGetPhoneNumber && o.onGetPhoneNumber.apply(o, arguments);
        }),
        A: s.o(function() {
            return o.onGetUserInfo && o.onGetUserInfo.apply(o, arguments);
        }),
        B: s.o(function() {
            return o.onError && o.onError.apply(o, arguments);
        }),
        C: s.o(function() {
            return o.onOpenSetting && o.onOpenSetting.apply(o, arguments);
        }),
        D: s.o(function() {
            return o.onLaunchApp && o.onLaunchApp.apply(o, arguments);
        }),
        E: s.o(function() {
            return o.onContact && o.onContact.apply(o, arguments);
        }),
        F: s.o(function() {
            return o.onChooseavatar && o.onChooseavatar.apply(o, arguments);
        }),
        G: s.o(function() {
            return o.onAgreeprivacyauthorization && o.onAgreeprivacyauthorization.apply(o, arguments);
        }),
        H: s.o(function() {
            return o.onAddgroupapp && o.onAddgroupapp.apply(o, arguments);
        }),
        I: s.o(function() {
            return o.onChooseaddress && o.onChooseaddress.apply(o, arguments);
        }),
        J: s.o(function() {
            return o.onSubscribe && o.onSubscribe.apply(o, arguments);
        }),
        K: s.o(function() {
            return o.onLogin && o.onLogin.apply(o, arguments);
        }),
        L: s.o(function() {
            return o.onIm && o.onIm.apply(o, arguments);
        }),
        M: s.s(r.baseColor),
        N: s.s(o.$uv.addStyle(o.customStyle)),
        O: s.o(function() {
            return r.clickHandler && r.clickHandler.apply(r, arguments);
        }),
        P: s.n(r.bemClass),
        Q: s.s(r.btnWrapperStyle)
    });
} ], [ "__scopeId", "data-v-f8a92508" ] ]);

wx.createComponent(l);